const {Menu} = require('electron');

/**
 * @author Chauncey
 * @description 菜单
 */
class SystemMenu {

    /**
     * 托盘菜单
     */
    static trayMenu(app) {

        return Menu.buildFromTemplate([
            {
                label: '关于', type: 'normal'
            },
            {
                label: '退出', type: 'normal', click: function () {
                    if (process.platform !== 'darwin') app.quit();
                }
            }
        ])
    }
}

module.exports = SystemMenu
